import request from '@/utils/request'

export const BrandApi = {

  /**
   *  分页
   * @returns
   */
  getPage: (data) => {
    return request({
      url: '/manage/mall/brand/getPage',
      data,
      method: 'post'
    })
  },

  /**
   *  获取所有类型
   * @returns
   */
  getAllList: () => {
    return request({
      url: '/manage/mall/brand/getAllList',
      method: 'get'
    })
  },

  /**
   *  删除
   * @returns
   */
  delete: (brandId) => {
    return request({
      url: '/manage/mall/brand/delete',
      params:{brandId},
      method: 'get'
    })
  },

  /**
   *  更新
   * @returns
   */
  update: (data) => {
    return request({
      url: '/manage/mall/brand/update',
      data,
      method: 'post'
    })
  },

  /**
   *  插入
   * @returns
   */
  insert: (data) => {
    return request({
      url: '/manage/mall/brand/insert',
      data,
      method: 'post'
    })
  },

  /**
   *  修改排序
   * @returns
   */
  updateSort: (data) => {
    return request({
      url: '/manage/mall/brand/updateSort',
      data,
      method: 'post'
    })
  },

  /**
   *  修改状态
   * @returns
   */
  updateStatus: (data) => {
    return request({
      url: '/manage/mall/brand/updateStatus',
      data,
      method: 'post'
    })
  }

}
